import pymysql

conn=pymysql.connect(host='localhost',user='root',password='',database='test12',port=3306)
cursor=conn.cursor()

cursor.execute('select 1')
result=cursor.fetchone()
print(result)

conn.close()
